www.gusucode.com > 云枫工作室企业网站源码 1 > 云枫工作室企业网站源码 1.0/云枫工作室企业网站源码(asp无限制版)1.0/web/admin/Manage_modliuyan.asp
<!--#include file="conn.asp"--> <!--#include file="check.asp" --> <% set rspaixu=server.createobject("adodb.recordset") paixusql="select * from Tsm_link order by paixu desc" rspaixu.open paixusql,conn,1,1 if not rspaixu.eof then thelastpaixu=rspaixu("paixu")+1 else thelastpaixu=1 end if rspaixu.close set rspaixu=nothing select case request("action") case "add" call add() case "addsave" call addsave() case "Modify" call Modify() case "Modifysave" call Modifysave() end select %> <% sub add() %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title></title> <link href="css.css" rel="stylesheet" type="text/css"> </head> <body> <!--#include file="top.htm"--> <br> <table width="90%" height="25" border="0" align="center" cellpadding="0" cellspacing="0"> <form name="myform" method="post" action="?action=addsave" onSubmit="return Check_addpro()"><tr> <td height="25" align="center" valign="middle" background="img/menu_manage.gif"><font color="#FFFFFF"><b>发 布 信 息</b></font></td> </tr> <tr> <td> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC"> <tr align="center" valign="middle" bgcolor="#FFFFFF"> <td height="25" colspan="2"> </td> </tr> <tr> <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF">网站名称:</td> <td width="85%" bgcolor="#F6F6F6"><input name="title" type="text" id="title" size="50" maxlength="50"> <font color="#FF0000"> *</font> </td> </tr> <tr> <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF">网站图标:</td> <td width="85%" bgcolor="#F6F6F6"><input name="pic" type="text" id="pic" size="50" maxlength="50"></td> </tr> <tr> <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF">链接地址:</td> <td width="85%" bgcolor="#F6F6F6"><input name="url" type="text" id="url" size="50" maxlength="255"> <font color="#FF0000"> *</font> </td> </tr> <tr> <td height="25" align="center" valign="middle" bgcolor="#FFFFFF">状 态:</td> <td bgcolor="#F6F6F6"><select name="shenhe"> <option value="1" selected>显示</option> <option value="0">隐藏</option> </select> <font color="#FF0000"> *</font> </td> </tr> <tr> <td width="15%" height="25" align="center" valign="middle" bgcolor="#FFFFFF">信息排序:</td> <td width="85%" bgcolor="#F6F6F6"><input name="paixu" type="text" id="paixu" size="20" maxlength="20" value="<%=thelastpaixu%>"> <font color="#FF0000"> *</font></td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td height="35"><div align="center"> <input type="submit" name="Submit" onSubmit="return check();" value="发布信息" onFocus="this.blur()"> <input type="reset" name="Submit" value=" 清 除 " onFocus="this.blur()"> <input type="button" name="Submit2" value=" 返 回 " onClick="history.go(-1)"> </div></td> </tr> </table> </td> </tr></form> </table> </body> </html> <% end sub sub addsave() if request("title")="" or isEmpty(request("title"))=true then %> <script language=javascript> alert( "[ 操作提示 ]\n\n信息标题不可为空,请输入信息标题!" ); location.href = "javascript:history.back()" </script> <% ElseIf request("url")="" or isEmpty(request("url"))=true Then %> <script language=javascript> alert( "[ 操作提示 ]\n\n链接地址不可为空,请输入链接地址!" ); location.href = "javascript:history.back()" </script> <% Else %> <% set rs=server.createobject("adodb.recordset") sql="select * from Tsm_link" rs.open sql,conn,1,3 rs.AddNew rs("shenhe") = request("shenhe") rs("title") = request("title") rs("url") = request("url") rs("paixu") = request("paixu") rs("pic") = request("pic") rs.Update rs.Close set rs=nothing conn.close set conn=nothing %> <script language=javascript> alert( "[ 操作提示 ]\n\n信息发布成功!" ); location.href = "Manage_adminlink.asp?thedelid=<%=id%>" </script> <% End If %> <% end sub %> <% sub Modify() %> <% id=request("id") set RsEdit=server.createobject("adodb.recordset") sqlEdit = "select * from Tsm_liuyan where id="& id RsEdit.open sqlEdit,conn,1,1 %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title></title> <link href="css.css" rel="stylesheet" type="text/css"> </head> <body> <!--#include file="top.htm"--><br> <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC"> <form name="myform" method="post" action="?action=Modifysave"> <tr align="center" valign="middle"> <td height="25" colspan="2" background="img/menu_manage.gif"><font color="#FFFFFF"><b>信 息</b></font></td> </tr> <tr bgcolor="#FFFFFF"> <td height="25" colspan="2"> </td> </tr> <tr> <td width="15%" height="25" align="center" bgcolor="#FFFFFF">信息标题:</td> <td width="85%" bgcolor="#FFFFFF"><input name="title" type="text" id="title" value="<%= RsEdit("title") %>" size="50" maxlength="50"> </td> </tr> <tr> <td width="15%" height="25" align="center" bgcolor="#FFFFFF">信息人:</td> <td width="85%" bgcolor="#FFFFFF"><input name="name1" type="text" id="name1" value="<%= RsEdit("name1") %>" size="50" maxlength="255"></td> </tr> <tr> <td width="15%" height="25" align="center" bgcolor="#FFFFFF">联系电话:</td> <td width="85%" bgcolor="#FFFFFF"><input name="tel" type="text" id="tel" value="<%= RsEdit("tel") %>" size="50" maxlength="255"></td> </tr> <tr> <td width="15%" height="25" align="center" bgcolor="#FFFFFF">电子邮箱:</td> <td width="85%" bgcolor="#FFFFFF"><input name="email" type="text" id="email" value="<%= RsEdit("email") %>" size="50" maxlength="255"></td> </tr> <tr> <td width="15%" height="25" align="center" bgcolor="#FFFFFF">信息内容:</td> <td width="85%" bgcolor="#FFFFFF"><textarea name="content" cols="60" rows="5" wrap="physical"><%= RsEdit("content") %></textarea> </td> </tr> <!-- <tr> <td width="15%" height="25" align="center" bgcolor="#FFFFFF">回复内容:</td> <td width="85%" bgcolor="#FFFFFF"><textarea name="reply" cols="60" rows="5" wrap="physical"><%'= RsEdit("reply") %></textarea> </td> </tr>--> <tr bgcolor="#FFFFFF"> <td colspan="2" align="center" valign="middle"><table width="100%" height="35" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td height="35" align="center" valign="middle"> <!-- <input name="id" type="hidden" id="id" value="<%'=rsEdit("id")%>"> <input type="submit" name="Submit" value="提交信息"> <input type="reset" name="Submit" value=" 清 除 "> --> <input type="button" name="Submit2" value=" 返 回 " onClick="history.go(-1)"> </td> </tr> </table></td> </tr></form> </table> </body> </html> <% end sub sub Modifysave() if trim(request("title"))="" or isEmpty(request("title"))=true then call ShowAlert("信息标题不可为空,请输入信息标题!","") Else set rs=server.createobject("adodb.recordset") sql="select * from Tsm_liuyan where id="& request("id") rs.open sql,conn,1,3 rs("title") = request("title") rs("content") = request("content") rs("reply") = request("reply") rs("name1") = request("name1") rs.Update rs.Close set rs=nothing conn.close set conn=nothing call ShowAlert("信息提交成功!","Manage_adminliuyan.asp") end if end sub %>